package com.guli.mall.vo;
/*
 * @Author 罗
 * @date 2020/10/14 - 5:06 下午
 */

import com.guli.common.to.SpuEsTo;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


@Data
public class SearchResultVo {

    private List<Attribution> attrs;

    private List<Category> categories;

    private List<Brand> brands;

    // 总记录数
    private Long total;

    // 总页数
    private Integer totalPageNum;

    // 存放记录
    private List<Hit> hits;


    @Data
    public static class Attribution {

        private Long attrId;

        private String attrName;

        private List<String> attrValues;

        public Attribution() {
            this.attrValues = new ArrayList<>();
        }
    }

    @Data
    public static class Category {
        private Integer categoryId;

        private String categoryName;
    }

    @Data
    public static class Brand {
        private Long brandId;

        private String brandName;

        private String brandImg;
    }

    @Data
    public static class Hit {

        private Long spuId;

        /**
         * 每个spu下的所有sku的所有销量
         * */
        private Integer saleCount = 0;

        /**
         * 每个spu下的所有sku的平均价格
         * */
        private Integer spuAvgPrice=0;

        private Integer currentSku = 0;

        private List<SpuEsTo> skuList;
    }
}
